package edu.bit.water.dao;

import edu.bit.water.entity.Authority;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AuthorityDao {
    List<Authority> selectAuthority();
    int removePerssionByRoleId(@Param("roleId") int roleId);
    boolean insertPermission(@Param("roleId") int roleId, @Param("aId") int aId, @Param("id") int id);
    Integer getMaxId();
    List<String>selectPermissionById(@Param("roleId") String roleId);
    Integer selectPermission(@Param("roleId") int roleId, @Param("authId") int authId);
    Integer queryPermission(@Param("userId") int userId, @Param("authId") int authId);
    Integer hasPermission(@Param("userId") int userId, @Param("authName") String authName, @Param("info") String info);
}
